<!DOCTYPE html>
<html>
<#include "../head.html">
    <body>
    <table class="mc">
        <tr>
            <td class="mc-l">
                <!--左侧导航---{-->
                <div id="navPanelContainer">
                    <div class="system-logo cd"></div>
                    <!--管理员信息---{-->
                    <#include "../adminInfo.html">
                        <!--管理员信息---}-->
                        <div class="nav-wrap">
                            <#include "left.html">
                        </div>
                </div>
                <!--左侧导航---}-->
            </td>
            <td class="mc-m">
                <div class="navToggle"></div>
            </td>
            <td class="mc-r">
                <!--顶部导航---{-->
                <#include "../topNav.html">
                    <!--顶部导航---}-->

                    <!--面包屑导航---{-->
                    <#assign moduleName="回款记录">
                        <#include "banner.html">
                            <!--面包屑导航---}-->

                            <!--工具栏--{-->
          		<div id="toolbar" class="clearfix">
                            <div class="toolbor-module export">
			                    <input type="button" onclick="exportxls()" value="导出报表" class="input-button export-btn"/>
			                </div>
                                <#if param?exists>
                                	<#if param.get("username")?exists><#assign username=param.get("username")></#if>
                                	<#if param.get("dotime1")?exists><#assign dotime1=param.get("dotime1")></#if>
                    				<#if param.get("dotime2")?exists><#assign dotime2=param.get("dotime2")></#if>
                    				<#if param.get("status")?exists><#assign status=param.get("status")?number><#else><#assign status=-1></#if>
                                </#if>
                                <div class="toolbor-module search">
                                	<input type="button" value="搜索"  class="input-button" onclick="sousuo();">
                                </div>    
                                <div class="toolbor-module search">
                                        <div class="select-box" id="status">
                                        <div class="tag-select">全部</div>
                                        <ul class="tag-options">
                                            <li data-value="" <#if status==-1 >data-selected="selected"</#if> class="open-selected">全部</li>
                                            <li data-value="0" <#if status==0 >data-selected="selected"</#if>>未审核</li>
                                            <li data-value="1" <#if status==1 >data-selected="selected"</#if>>审核通过</li>
                                            <li data-value="4" <#if status==4 >data-selected="selected"</#if>>审核失败</li>
                                            <!-- v1.6.6.2 zhangyz start -->
                                            <li data-value="4" <#if status==5 >data-selected="selected"</#if>>回款撤回</li>
                                            <!-- v1.6.6.2 zhangyz end -->
                                        </ul>
                                    	</div>
                                </div>
                                
                                <div class="toolbor-module search">
                                    <div style="height:22px;line-height:22px;float:left;">回款用途：</div>
                                    <div class="select-box" id="huikuan">
                                        <div class="tag-select">全部</div>
                                        <ul class="tag-options">
                                            <li data-value="0" class="open-selected">全部</li>
                                            <li data-value="1" <#if huikuan??&&huikuan=="1">data-selected="selected"</#if>>回款续投</li>
                                            <li data-value="2" <#if huikuan??&&huikuan=="2">data-selected="selected"</#if>>回款提现</li>
                                        </ul>
                                    </div>
                                </div>
                                
                                <div class="toolbor-module search">
                                   <div style="height:22px;line-height:22px;float:left;">时间：</div>
                    				<input class="_search-value js-datetime" name="dotime1" id="dotime1" value="${dotime1}" size="15" onclick="change_picktime()"/>
                    				<div style="height:22px;line-height:22px;float:left;margin:0 8px;"> 到 </div>
                    				<input class="_search-value js-datetime" name="dotime2" id="dotime2"  value="${dotime2}"  size="15" onclick="change_picktime()"/>
                                </div>
								<div class="toolbor-module search">
									<input type="text" name="username" id="username" value="请输入用户名" data-value="请输入用户名" class="search-value">
									<!-- v1.6.7.1 RDPROJECT-402 zza 2013-11-07 start -->
									<input type="text" name="realname" id="realname" value="请输入真实姓名" data-value="请输入真实姓名" class="search-value">
									<!-- v1.6.7.1 RDPROJECT-402 zza 2013-11-07 end -->
								</div>

				</div>
            <!--工具栏--}-->

            <div id="main" class="clearfix">
			<form action="" method="post">
			  <table class="data-list" >
				<tr class="header">
					<td >ID</td>
		            <td>用户名</td>
		            <!-- v1.6.7.1 RDPROJECT-402 zza 2013-11-07 start -->
		            <td>真实姓名</td>
		            <!-- v1.6.7.1 RDPROJECT-402 zza 2013-11-07 end -->
					<td>回款金额</td>
					<td>添加时间</td>
					<td>备注</td>
					<!--v1.6.6.1 RDPROJECT-30 wcw 2013-09-27 START  --> 
				    <td>审核备注</td>
				    <!--v1.6.6.1 RDPROJECT-30 wcw 2013-09-27 START  --> 
					<td>状态</td>
					<td>操作</td>
				</tr>
				<#if list??>
				<#list list as item>
				<tr class="s">
					<td>${(item.id!0)?c}</td>
					<td><a href="javascript:void(0)" onclick='alertPop("用户详细信息查看","url:get?${request.getContextPath()}/admin/attestation/viewUserInfo.html?username=${item.username!}",500,230,"true","","true","text")'>
						${item.username!}
					</a></td>
					<!-- v1.6.7.1 RDPROJECT-402 zza 2013-11-07 start -->
					<td>${item.realname!}</td>
					<!-- v1.6.7.1 RDPROJECT-402 zza 2013-11-07 end -->
					<td>${item.huikuan_money!}</td>
                    <td>${dateformat(item.addtime!"")}</td>
					<td>${item.remark!}</td>
					<td>${item.verify_remark!}</td>
					<!-- v1.6.6.2 zhangyz start -->
					<td><font color="#6699CC"><#if item.status=="1">成功<#elseif item.status=="0">未审核<#elseif item.status=="5">撤回<#else>审核失败</#if></font></td>
					<!-- v1.6.6.2 zhangyz end -->
					<td ><a href="viewHuikuan.html?id=${item.id?c}">审核/查看</a></td>
				</tr>
				</#list>
				</#if>
				
			</table>
		</form>	
		<!--<div class="floatl"><a href="#" onClick="exportxls()">导出报表</a></div>-->
        <div id="bottomToolbar" class="clearfix">
                    <div class="other-tool">
                        <dl class="refresh-data">
                            <dt class="refresh-data-icon"></dt>
                            <dd><a href="javascript:void(0);" class="refresh-page">刷新数据</a></dd>
                        </dl>
                    </div>
		  <div class="container">
              <#import "../../common/page.html" as pager>  
			         	<@pager.pagination page=page url="/admin/cash/showAllHuikuan.html" map=param style="style1"  /> 
          </div>
      </div>
           </div>
            </td>
        </tr>
        <tr>
            <!--尾部--{-->
            <td colspan="3" class="mc-b"><#include "../foot.html"></td>
            <!--尾部--}-->
        </tr>
    </table>
<div class="msgClass">
<@s.actionmessage/>
</div>
    </body>
</html>
<#include "../jsPage.html">

<script>
	var url = 'showAllHuikuan.html?search=true';
	var xlsurl = 'showAllHuikuan.html?type=export';
	
	function sousuo(){
		var sou = "";
		var username = $("#username").val();
		if (username!=""&&username!="请输入用户名"){
			sou += "&username="+username;
		}
		var status =$("#status").find(".open-selected").attr("data-value");
		if (status!="" && status!=null){
			sou += "&status="+status;
		}
		var huikuan =$("#huikuan").find(".open-selected").attr("data-value");
		if (huikuan!="" && huikuan!=null){
			sou += "&huikuan="+huikuan;
		}
		var dotime1 = $("#dotime1").val();
		var dotime2 = $("#dotime2").val();
		if (dotime1!=null){
			sou += "&dotime1="+dotime1;
		}
		if (dotime2!=null){
			sou += "&dotime2="+dotime2;
		}
		// v1.6.7.1 RDPROJECT-402 zza 2013-11-07 start
        var realname = $("#realname").val();
        if (realname!=null&&realname!=""&&realname!="undefine"&&realname!="请输入真实姓名"){
            sou += "&realname="+realname;
        }
     	// v1.6.7.1 RDPROJECT-402 zza 2013-11-07 end
		if (sou!=""){
			location.href=url+sou;
		}
	}
	function exportxls(){
		var sou = "";
		var username = $("#username").val();
		if (username!=""&&username!="请输入用户名"){
			sou += "&username="+username;
		}
		var status = $("#status").find(".open-selected").attr("data-value");
		if (status!="" && status!=null){
			sou += "&status="+status;
		}
		var huikuan =$("#huikuan").find(".open-selected").attr("data-value");
		if (huikuan!="" && huikuan!=null){
			sou += "&huikuan="+huikuan;
		}
		var dotime1 = $("#dotime1").val();
		var dotime2 = $("#dotime2").val();
		if (dotime1!=null){
			sou += "&dotime1="+dotime1;
		}
		if (dotime2!=null){
			sou += "&dotime2="+dotime2;
		}
		// v1.6.7.1 RDPROJECT-402 zza 2013-11-07 start
        var realname = $("#realname").val();
        if (realname!=null&&realname!=""&&realname!="undefine"&&realname!="请输入真实姓名"){
            sou += "&realname="+realname;
        }
     	// v1.6.7.1 RDPROJECT-402 zza 2013-11-07 end
		if (sou!=""){
			location.href=xlsurl+sou;
		}else{
	
			location.href=xlsurl;
		}
	}
	</script>
